package mutsumimod.cards.custom;

import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import com.megacrit.cardcrawl.powers.AbstractPower;
import com.megacrit.cardcrawl.powers.WeakPower;
import mutsumimod.cards.BaseCard;
import mutsumimod.character.Mutsumi;
import mutsumimod.monitors.SuperMetalMonitor;
import mutsumimod.powers.BreakPower;
import mutsumimod.powers.StandPower;
import mutsumimod.util.CardStats;

public class MutsumiCircle extends BaseCard {
    public static final String ID = makeID(MutsumiCircle.class.getSimpleName());
    public static final CardStats info = new CardStats(
            Mutsumi.Meta.CARD_COLOR,
            CardType.ATTACK,
            CardRarity.COMMON,
            CardTarget.ALL_ENEMY,
            1
    );

    public MutsumiCircle() {
        super(ID, info);
        setAttr(0,0,3);
        setAttrUpg(0,0,1);
        isMultiDamage = true;
    }

    @Override
    public void use(AbstractPlayer p, AbstractMonster m) {
        damageAllMonster();
    }

    @Override
    public void applyPowers() {
        int amount=0;
        if(AbstractDungeon.player.hasPower(StandPower.POWER_ID)) {
            amount = AbstractDungeon.player.getPower(StandPower.POWER_ID).amount;
        }
        baseDamage=magicNumber*amount;
        super.applyPowers();
        updateDescription();
    }

    @Override
    public void updateDescription() {
        if(AbstractDungeon.player==null){
            rawDescription = cardStrings.DESCRIPTION;
        }else{
            rawDescription = cardStrings.DESCRIPTION+cardStrings.EXTENDED_DESCRIPTION[0];
        }
        initializeDescription();
    }

    @Override
    public AbstractCard makeCopy() { //Optional
        return new MutsumiCircle();
    }
}
